﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Go.Tools;
using tpGo;

namespace tpGo
{
    class InterBoard
    {

        public static Dictionary<Coordinate, Intersection> createTablero(int size, int altura, Tablero untablero)
        {
            Dictionary<Coordinate, Intersection> board = InterBoard.createIntersection(size, altura, untablero);
            return board;
        }

        private static Dictionary<Coordinate, Intersection> createIntersection(int size, int altura, Tablero untablero)
        {
            Dictionary<Coordinate, Intersection> board = new Dictionary<Coordinate, Intersection>();
            int Y , X ;
            for (int i = 0; i < size ; i++)
            {
                X = Tablero.LEFTOFFSET + i* altura;
                for (int j = 0; j < size; j++)
                {
                    Y = Tablero.UPOFFSET + j* altura;
                    Coordinate aCoordinateBoard = Functions.getCoordinate(i, j);
                    Coordinate aCoordinate = Functions.getCoordinate(X, Y);
                    Intersection aNewIntersection = new Intersection(aCoordinate, untablero);
                    board.Add(aCoordinateBoard, aNewIntersection);
                }
            }
            return board;
        }

        private static Coordinate getCoordinate(int X, int Y)
        {
            throw new NotImplementedException();
        }
    }
}
